//芸泰公用字体图标库
@font-face {
    font-family: "iconfont-hsyt"; /* project id 1352162 */
    src: url("//at.alicdn.com/t/font_1352162_np4nago2hkr.eot");
    src: url("//at.alicdn.com/t/font_1352162_np4nago2hkr.eot?#iefix") format("embedded-opentype"),
        url("//at.alicdn.com/t/font_1352162_np4nago2hkr.woff2") format("woff2"),
        url("//at.alicdn.com/t/font_1352162_np4nago2hkr.woff") format("woff"),
        url("//at.alicdn.com/t/font_1352162_np4nago2hkr.ttf") format("truetype"),
        url("//at.alicdn.com/t/font_1352162_np4nago2hkr.svg#iconfont-hsyt") format("svg");
}

.iconfont-hsyt {
    font-family: "iconfont-hsyt";
}

//绿色主题：#32b16c
$green_theme: rgba(50, 177, 108, 1);
$green_theme_01: rgba(50, 177, 108, 0.1);
$green_theme_04: rgba(50, 177, 108, 0.4);
$green_theme_05: rgba(50, 177, 108, 0.5);

//深绿色主题：A37C43(协和、京医通项目)
$dark_green_theme: rgba(40, 154, 64, 1);
$dark_green_theme_01: rgba(40, 154, 64, 0.1);
$dark_green_theme_04: rgba(40, 154, 64, 0.4);
$dark_green_theme_05: rgba(40, 154, 64, 0.5);

//蓝色主题:#00BCD4
$blue_theme: rgba(0, 188, 212, 1);
$blue_theme_01: rgba(0, 188, 212, 0.1);
$blue_theme_04: rgba(0, 188, 212, 0.4);
$blue_theme_05: rgba(0, 188, 212, 0.5);

//粉色主题:#FE4772
$pink_theme: rgba(254, 71, 114, 1);
$pink_theme_01: rgba(254, 71, 114, 0.1);
$pink_theme_04: rgba(254, 71, 114, 0.4);
$pink_theme_05: rgba(254, 71, 114, 0.5);

//棕色主题:#A37C43
$brown_theme: rgba(163, 124, 67, 1);
$brown_theme_01: rgba(163, 124, 67, 0.1);
$brown_theme_04: rgba(163, 124, 67, 0.4);
$brown_theme_05: rgba(163, 124, 67, 0.5);

//医生端主题
$dct_theme: rgba(75, 151, 248, 1);
$dct_theme_01: rgba(75, 151, 248, 0.1);
$dct_theme_04: rgba(75, 151, 248, 0.4);
$dct_theme_05: rgba(75, 151, 248, 0.5);

//红褐色主题:#903C2A
$maroon_theme: rgba(144, 60, 42, 1);
$maroon_theme_01: rgba(144, 60, 42, 0.1);
$maroon_theme_04: rgba(144, 60, 42, 0.4);
$maroon_theme_05: rgba(144, 60, 42, 0.5);

$themeArr: (
    "green": (
        "color": $green_theme,
        "background-color": $green_theme,
        "background": $green_theme,
        "shadow-color": $green_theme_05,
        "background_op01": $green_theme_01,
        "background_op04": $green_theme_04,
    ),
    "dark_green": (
        "color": $dark_green_theme,
        "background-color": $dark_green_theme,
        "background": $dark_green_theme,
        "shadow-color": $dark_green_theme_05,
        "background_op01": $dark_green_theme_01,
        "background_op04": $dark_green_theme_04,
    ),
    "blue": (
        "color": $blue_theme,
        "background-color": $blue_theme,
        "background": $blue_theme,
        "shadow-color": $blue_theme_05,
        "background_op01": $blue_theme_01,
        "background_op04": $blue_theme_04,
    ),
    "pink": (
        "color": $pink_theme,
        "background-color": $pink_theme,
        "background": $pink_theme,
        "shadow-color": $pink_theme_05,
        "background_op01": $pink_theme_01,
        "background_op04": $pink_theme_04,
    ),
    "brown": (
        "color": $brown_theme,
        "background-color": $brown_theme,
        "background": $brown_theme,
        "shadow-color": $brown_theme_05,
        "background_op01": $brown_theme_01,
        "background_op04": $brown_theme_04,
    ),
    "maroon": (
        "color": $maroon_theme,
        "background-color": $maroon_theme,
        "background": $maroon_theme,
        "shadow-color": $maroon_theme_05,
        "background_op01": $maroon_theme_01,
        "background_op04": $maroon_theme_04,
    ),
    "dct": (
        "color": $dct_theme,
        "background-color": $dct_theme,
        "background": $dct_theme,
        "shadow-color": $dct_theme_05,
        "background_op01": $dct_theme_01,
        "background_op04": $dct_theme_04,
    ),
);

//$valueKey为索要获取的制定属性值，默认使用$keyStyle
@mixin setThemes($keyStyle: "color", $valueKey: "", $themes: $themeArr) {
    @each $theme, $map in $themes {
        .yt-theme-#{$theme} & {
            @if $valueKey != "" {
                #{$keyStyle}: map-get($map, $valueKey);
            } @else {
                #{$keyStyle}: map-get($map, $keyStyle);
            }

            @content;
        }
    }
}

//处理boxShadow不能单独设置颜色的问题
@mixin setBoxShadow($h, $v, $b, $s, $themes: $themeArr) {
    @each $theme, $map in $themes {
        .yt-theme-#{$theme} & {
            box-shadow: $h $v $b $s map-get($map, "shadow-color");
        }
    }
}

//处理全局的视口控制
$MAX_SCREEN_WIDTH: 100%;
#J_reactApp {
    max-width: $MAX_SCREEN_WIDTH !important;
    margin: 0 auto;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
}

//处理fix定位问题
.HACK_FIXED {
    max-width: $MAX_SCREEN_WIDTH !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}
